Optimal. Leaf size=95 \[ \frac {a^2 (3 B+i A)}{4 c^5 f (\tan (e+f x)+i)^4}+\frac {2 a^2 (A-i B)}{5 c^5 f (\tan (e+f x)+i)^5}+\frac {i a^2 B}{3 c^5 f (\tan (e+f x)+i)^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.049, Rules used = {3588, 77} \[ \frac {a^2 (3 B+i A)}{4 c^5 f (\tan (e+f x)+i)^4}+\frac {2 a^2 (A-i B)}{5 c^5 f (\tan (e+f x)+i)^5}+\frac {i a^2 B}{3 c^5 f (\tan (e+f x)+i)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 77
Rule 3588
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x))^2 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^5} \, dx &=\frac {(a c) \operatorname {Subst}\left (\int \frac {(a+i a x) (A+B x)}{(c-i c x)^6} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \operatorname {Subst}\left (\int \left (-\frac {2 a (A-i B)}{c^6 (i+x)^6}-\frac {i a (A-3 i B)}{c^6 (i+x)^5}-\frac {i a B}{c^6 (i+x)^4}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {2 a^2 (A-i B)}{5 c^5 f (i+\tan (e+f x))^5}+\frac {a^2 (i A+3 B)}{4 c^5 f (i+\tan (e+f x))^4}+\frac {i a^2 B}{3 c^5 f (i+\tan (e+f x))^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 3.95, size = 116, normalized size = 1.22 \[ \frac {a^2 (\cos (7 e+9 f x)+i \sin (7 e+9 f x)) (-(3 A+7 i B) (5 \sin (e+f x)+6 \sin (3 (e+f x)))+5 (B-21 i A) \cos (e+f x)+6 (3 B-7 i A) \cos (3 (e+f x)))}{960 c^5 f (\cos (f x)+i \sin (f x))^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.61, size = 89, normalized size = 0.94 \[ \frac {{\left (-12 i \, A - 12 \, B\right )} a^{2} e^{\left (10 i \, f x + 10 i \, e\right )} + {\left (-45 i \, A - 15 \, B\right )} a^{2} e^{\left (8 i \, f x + 8 i \, e\right )} + {\left (-60 i \, A + 20 \, B\right )} a^{2} e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (-30 i \, A + 30 \, B\right )} a^{2} e^{\left (4 i \, f x + 4 i \, e\right )}}{960 \, c^{5} f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 4.70, size = 309, normalized size = 3.25 \[ -\frac {2 \, {\left (15 \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} + 45 i \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} - 15 \, B a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} - 150 \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 10 i \, B a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 225 i \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 55 \, B a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 306 \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 24 i \, B a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 225 i \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 55 \, B a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 150 \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 10 i \, B a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 45 i \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 15 \, B a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 15 \, A a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{15 \, c^{5} f {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{10}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.25, size = 69, normalized size = 0.73 \[ \frac {a^{2} \left (-\frac {2 i B -2 A}{5 \left (\tan \left (f x +e \right )+i\right )^{5}}+\frac {i B}{3 \left (\tan \left (f x +e \right )+i\right )^{3}}-\frac {-i A -3 B}{4 \left (\tan \left (f x +e \right )+i\right )^{4}}\right )}{f \,c^{5}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.77, size = 108, normalized size = 1.14 \[ \frac {\frac {a^2\,\left (9\,A+B\,1{}\mathrm {i}\right )}{60}+\frac {a^2\,\mathrm {tan}\left (e+f\,x\right )\,\left (5\,B+A\,15{}\mathrm {i}\right )}{60}+\frac {B\,a^2\,{\mathrm {tan}\left (e+f\,x\right )}^2\,1{}\mathrm {i}}{3}}{c^5\,f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^5+{\mathrm {tan}\left (e+f\,x\right )}^4\,5{}\mathrm {i}-10\,{\mathrm {tan}\left (e+f\,x\right )}^3-{\mathrm {tan}\left (e+f\,x\right )}^2\,10{}\mathrm {i}+5\,\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.90, size = 333, normalized size = 3.51 \[ \begin {cases} \frac {\left (- 245760 i A a^{2} c^{15} f^{3} e^{4 i e} + 245760 B a^{2} c^{15} f^{3} e^{4 i e}\right ) e^{4 i f x} + \left (- 491520 i A a^{2} c^{15} f^{3} e^{6 i e} + 163840 B a^{2} c^{15} f^{3} e^{6 i e}\right ) e^{6 i f x} + \left (- 368640 i A a^{2} c^{15} f^{3} e^{8 i e} - 122880 B a^{2} c^{15} f^{3} e^{8 i e}\right ) e^{8 i f x} + \left (- 98304 i A a^{2} c^{15} f^{3} e^{10 i e} - 98304 B a^{2} c^{15} f^{3} e^{10 i e}\right ) e^{10 i f x}}{7864320 c^{20} f^{4}} & \text {for}\: 7864320 c^{20} f^{4} \neq 0 \\\frac {x \left (A a^{2} e^{10 i e} + 3 A a^{2} e^{8 i e} + 3 A a^{2} e^{6 i e} + A a^{2} e^{4 i e} - i B a^{2} e^{10 i e} - i B a^{2} e^{8 i e} + i B a^{2} e^{6 i e} + i B a^{2} e^{4 i e}\right )}{8 c^{5}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________